package cn.iocoder.yudao.module.system.dal.mysql.usershops;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.usershops.UserShopsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.system.controller.admin.usershops.vo.*;

/**
 * 用户店铺关联 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface UserShopsMapper extends BaseMapperX<UserShopsDO> {

    default PageResult<UserShopsDO> selectPage(UserShopsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<UserShopsDO>()
                .eqIfPresent(UserShopsDO::getId, reqVO.getId())
                .eqIfPresent(UserShopsDO::getUserId, reqVO.getUserId())
                .eqIfPresent(UserShopsDO::getShopId, reqVO.getShopId())
                .orderByDesc(UserShopsDO::getId));
    }

}